package kr.or.kead.utils;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import javax.management.RuntimeErrorException;


public class MySqlCon {
	private static Connection getDatebaseConnection() throws ClassNotFoundException{
		Class.forName("com.mysql.jdbc.Driver");
		try {
			return DriverManager.getConnection("jdbc:mysql://localhost:3306/daegu_kead", "root", "apmsetup");
		} catch (SQLException e) {
			throw new RuntimeException(e);
		}
		
	}
	public static Connection getConn(){
		Connection con = null;
		try {
			con = MySqlCon.getDatebaseConnection();
		} catch (ClassNotFoundException e1) {
			e1.printStackTrace();
		}
		return con;
	}
}
